package com.gump.essay.juc;

/**
 * @auther zzc
 * @date 2021 04 18
 */
public class 多线程生产消费 {


    public static void main(String[] args) {
        资源类 资源类 = new 资源类();

        new Thread(() -> {
            for (int i = 0; i < 5; i++) {
                资源类.add();
            }
        },"aa").start();

        new Thread(() -> {
            for (int i = 0; i < 5; i++) {
                资源类.remove();
            }
        },"bb").start();
    }

}
